home *** CD-ROM | disk | FTP | other *** search
- Path: solon.com!not-for-mail
- From: seebs@solutions.solon.com (Peter Seebach)
- Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++,comp.edu
- Subject: Re: ANSI C and POSIX (was Re: C/C++ knocks the crap out of Ada)
- Date: 5 Apr 1996 14:13:36 -0600
- Organization: Usenet Fact Police (Undercover)
- Message-ID: <4k3utg$ndp@solutions.solon.com>
- References: <JSA.96Feb16135027@organon.com> <emery-0204960656230001@line030.nwm.mindlink.net> <828632277snz@genesis.demon.co.uk> <dewar.828704810@schonberg>
- Reply-To: seebs@solon.com
- NNTP-Posting-Host: solutions.solon.com
-
- In article <dewar.828704810@schonberg>, Robert Dewar <dewar@cs.nyu.edu> wrote:
- >Unix standards?????
-
- You know, POSIX, Spec 1170, X/Open, that kind of stuff. POSIX is the one the
- US govt. will not use Win NT because of, because it doesn't match the spec
- they've selected.
-
- Begging pardon, but why does an obviously well-educated person feel the need
- to use multiple question marks on a query about something which has been
- common knowledge for at least a couple of years? I've been seeing POSIX books
- for quite some time.
-
- It seems as though you're a bit out of touch with the Unix world; you were
- amazed that Linux killed a program which did
- read(fd, buf, nbytes);
- when buf wasn't large enough for nbytes, simply because the file
- didn't have nbytes left, and had less data than buf could hold.
- (This came up in a previous discussion.)
-
- You were surprised when people pointed out that standard C allows an
- implementation to catch and prohibit attempts to modify the internals of a
- FILE, and that in fact, code which does so has ceased to be legal C.
-
- You are constantly amazed by claims about standards for C or Unix which may be
- a year or more old.
-
- I am getting the impression that you've not really taken the time to keep up
- with the standards community, and have been complaining about the excessive
- chumminess with the compiler that used to be considered normal and healthy in
- C.
-
- It's not, anymore. Linus Torvalds, a man who has probably written a fair
- amount of low-level code in C, some of it terriyingly optimized, was recently
- seen flaming people for advocating unportable tricks in C - tricks which work
- on *every* major C implementation currently in use.
-
- I can certainly understand your position; I've seen C advocates talk about
- what Ada 83 did, and comparing it with C 89. But it's not fair when they do
- it, and it's not fair when you do it, either, no matter *how* good you are.
- (And I must admit, by all accounts, you're quite good.)
-
- Sometime, take a weekend or so to catch up with how modern C is
- written, what the standards do and don't guarantee, and look at
- some of the checks, warnings, and analyses available from modern
- C programming tools. I think you'll find that C has matured
- quite a lot as a programming language since, say, 1983.
-
- Most of your complaints about C and Unix match up strongly with
- the frustrations I had getting things to run on an SVR4/ANSI C
- environment in 1990 or so, when C was only a year old as a standardized
- language, and no one was really writing for it yet. That was quite
- a while ago for this industry; right now, I can write "portable"
- programs and expect them to work on every commercial Unix, and
- every free Unix. I don't have to think very hard to do it; I just
- write code the way I would anyway, and it magically works.
-
- I occasionally have to put in some sort of sop for a broken system, but
- rarely; they're getting rarer, and I don't expect to even think about it in
- another couple of years.
-
- -s
- --
- Peter Seebach - seebs@solon.com - Copyright 1996 Peter Seebach.
- C/Unix wizard -- C/Unix questions? Send mail for help. No, really!
- FUCK the communications decency act. Goddamned government. [literally.]
- The *other* C FAQ - http://www.solon.com/~seebs/c/c-iaq.html
-